Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse arrow and parquet schema from PG table's tuple descriptor #24

Closed
wants to merge 1 commit into from

Conversation

aykut-bozkurt
Copy link
Collaborator

No description provided.

field_id.to_string(),
)]);

*field_id += 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of wondering whether we should be slightly cleverer about field IDs to not instantly renumber everything if a column gets dropped

(but no great ideas there)

} else {
Field::new(elem_name, arrow::datatypes::DataType::Utf8, true)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a comment on interval / other things that we'd like to have in this list

Schema::new(Fields::from(struct_attribute_fields))
}

fn visit_struct_schema(tupledesc: PgTupleDesc, elem_name: &str, field_id: &mut i32) -> Arc<Field> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use function comments, visit is vague

@@ -0,0 +1,290 @@
use std::{collections::HashMap, ops::Deref, sync::Arc};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to add a high-level description at the top of the file of what it does. schema_visitor is vague

Parses arrow and parquet schema from PG table's tuple descriptor. Ensures the tupledesc
and the schema matches.
@aykut-bozkurt
Copy link
Collaborator Author

Addressed at development branch.

@aykut-bozkurt aykut-bozkurt deleted the schema-parse branch October 17, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants